from operation.db_operation import stock_collect_Operation
from utils.data_proccess import *

#股票收藏模块
def add_collect_stock(kwargs):
    s_c_o = stock_collect_Operation()
    result = s_c_o.add_collect(kwargs)
    return result

#股票取消收藏
def del_collect_stock(kwargs):
    s_c_o = stock_collect_Operation()
    result = s_c_o.del_collect(kwargs)
    return result

def get_mycollect_stock(userID):
    s_c_o = stock_collect_Operation()
    result_data = s_c_o.get_collect_stock(userID)
    result  =  Class_To_Data(result_data,s_c_o.__fields__)
    return result

def is_stock_collect(userId,stockname):
    s_c_o = stock_collect_Operation()
    return s_c_o.is_collect(userId,stockname)





